#include <bits/stdc++.h>
using namespace std;
int n;
double ans = 0;

int main() {
    cin >> n;
    int p = 1, q = 2, t;
    for (int i = 1; i <= n; i++) {
        ans += (double)q / p;
        t = p + q;
        p = q;
        q = t;
    }

    cout << fixed << setprecision(4) << ans;
    return 0;
}